cookieclickerfandomcom-20200223-history
Talk:Upgrade/@comment-146.90.149.117-20130914155955/@comment-146.90.149.117-20130914195809
OK, I think I worked it out. I might myself have made some other mistakes along the line that's confused it, but the main article text DOES still need alteration, for both clarity and in fact accuracy. Analysing step by step: First of all, the variable "mult" (which for clarity I will capitalise through the rest of this), is defined at a base rate of 100%. Or in other works, MULT = 1. I presume the "if (me.type 'cookie' && Game.Has(me.name)) mult+=me.power*0.01;" part of the code involves the flavoured cookie upgrades. This means they happen first, before anything else, and are modified by everything that comes after. In my case, the 125% bonus is added onto MULT. 1 + 1.25. MULT is now 2.25... Then it adds in the non-cookie bonuses. 1+2+3+4+5%, as I have all of them. +0.15. MULT is now 2.4 We skip the bit regarding heavenly chips; however, they would be directly added to the multiplier at this point. Effectively, the flavoured cookies, research centre bonuses, and heavenly chips are all added at once, and form the base multiplier figure. THIS is what the Kittens' milk-multiplier works upon, NOT the flavoured cookie bonus itself. THEN we have the milk multipliers. They DO work in the form "1 + 0.05 x Milk" if you follow normal BODMAS rules (or your local equivalent); but, neither the equation itself nor "milk" actually needs to be in brackets. To clarify things and to ensure that even people who subscribe to a different order-of-operations rule get it right, I would propose instead writing it as "(Milk x 0.05) + 1" or similar; it's not the same as what's in the program code, but at this point we're trying to make it human-readable. All applicable lines are executed, in order. Unless you are using the debug mode, having a later upgrade implies having the earlier one(s). So as I have the Engineers, all three lines are run one at a time. Kitten helpers: MULT is multiplied by 1.152 (ie, (3.04 x 0.05) + 1), and becomes 2.7648 Kitten workers: MULT is multiplied by 1.304 (ie, (3.04 x 0.1) +1), and becomes 3.6053 Kitten engineers: MULT is multiplied by 1.608 (etc etc), for a final total of 5.7973 This would presumably be rounded off to 580%. Actually, when I started working this all out again, I did 551 / 0.95 and it came out as 580. I'm not entirely certain which incorrect button I frobbed to get 564 before, but there we go. A mistake was made, I apologise. (We ignore the bit about the frenzies, as this is not relevant here) Then we multiply 579.73% by 0.95 to get 550.75%, which rounds off to 551%. Job done. Mind that the final part regarding the Elder Covenant is also unclear / possibly incorrect in the article text. 5% is not "taken away" from the final figure (which, given how most of the other upgrades are applied, would suggest "(580 - 5)%", not "580 (minus 5%)" - so you'd have 575% instead of 551%). Instead, the figure is reduced by 5%. It might be clearer just to say that it is implemented by multiplying the final bonus multiplier by 95%. Or that the elder covenant simply reduces the total CPS by 5% of whatever it currently is, because regardless of the behind-the-scenes mechanism used to achieve this, the end result is the same. Seeing as I haven't got a user account and no desire to try and fit yet another bloody username and password into my head, can someone edit these changes in should I find that wikia (as it's not wikipedia) doesn't allow anonymous edits?